package javaInterview;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

/**
 * @author Cyxan
 * @version 1.0
 */
public class Stream_ {

    public static void main(String[] args) {

        List<Integer> number = Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9, 10);

        Map<Boolean, List<Integer>> map = number.stream()
                .filter(i -> i > 5)
                .map(i -> i * i)
                .collect(Collectors.partitioningBy(i -> i % 2 == 0));
        System.out.println(map);
    }

    

}


